package com.surenpi.jenkins.client.core;

import com.surenpi.jenkins.client.BaseModel;
import java.util.List;

public class Action extends BaseModel {
   private List<Parameter> parameters;
   private List<Cause> causes;
   private LastBuiltRevision lastBuiltRevision;

   public List<Parameter> getParameters() {
      return this.parameters;
   }

   public List<Cause> getCauses() {
      return this.causes;
   }

   public LastBuiltRevision getLastBuiltRevision() {
      return this.lastBuiltRevision;
   }

   public void setParameters(final List<Parameter> parameters) {
      this.parameters = parameters;
   }

   public void setCauses(final List<Cause> causes) {
      this.causes = causes;
   }

   public void setLastBuiltRevision(final LastBuiltRevision lastBuiltRevision) {
      this.lastBuiltRevision = lastBuiltRevision;
   }

   public boolean equals(final Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof Action)) {
         return false;
      } else {
         Action other = (Action)o;
         if (!other.canEqual(this)) {
            return false;
         } else {
            Object this$parameters = this.getParameters();
            Object other$parameters = other.getParameters();
            if (this$parameters == null) {
               if (other$parameters != null) {
                  return false;
               }
            } else if (!this$parameters.equals(other$parameters)) {
               return false;
            }

            Object this$causes = this.getCauses();
            Object other$causes = other.getCauses();
            if (this$causes == null) {
               if (other$causes != null) {
                  return false;
               }
            } else if (!this$causes.equals(other$causes)) {
               return false;
            }

            Object this$lastBuiltRevision = this.getLastBuiltRevision();
            Object other$lastBuiltRevision = other.getLastBuiltRevision();
            if (this$lastBuiltRevision == null) {
               if (other$lastBuiltRevision != null) {
                  return false;
               }
            } else if (!this$lastBuiltRevision.equals(other$lastBuiltRevision)) {
               return false;
            }

            return true;
         }
      }
   }

   protected boolean canEqual(final Object other) {
      return other instanceof Action;
   }

   public int hashCode() {
      int PRIME = 59;
      int result = 1;
      Object $parameters = this.getParameters();
      result = result * 59 + ($parameters == null ? 43 : $parameters.hashCode());
      Object $causes = this.getCauses();
      result = result * 59 + ($causes == null ? 43 : $causes.hashCode());
      Object $lastBuiltRevision = this.getLastBuiltRevision();
      result = result * 59 + ($lastBuiltRevision == null ? 43 : $lastBuiltRevision.hashCode());
      return result;
   }

   public String toString() {
      return "Action(parameters=" + this.getParameters() + ", causes=" + this.getCauses() + ", lastBuiltRevision=" + this.getLastBuiltRevision() + ")";
   }
}
